<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 计算现在距离国庆还有多少天
        var diffTime = Date.parse('2022-10-01') - (+new Date());
        console.log('国庆倒计时' + parseInt(diffTime / (24 * 3600 * 1000)) + '天')
    </script>
</body>

</html>